package contract;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ContractUpdate extends HttpServlet{
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doPost(req, resp);
	}
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		String ct_no = req.getParameter("ct_no");
		String md_pp = (String)req.getSession().getAttribute("mid");
		ContractDTO cont = new ContractDTO();
		ContractDAO dao = new ContractDAO();
		//System.out.println(ct_no+"/"+md_pp);
		cont.setCt_no(ct_no);
		cont.setCt_ing("06");
		cont.setMd_pp(md_pp);
		dao.setCont(cont);
		boolean flag = dao.appUp();
		if(flag){
			//System.out.println("수정 성공");
		}else{
			//System.out.println("수정 실패");
		}
	}
	
}
